<?php
$this->breadcrumbs=array(
	'View Request'=>array('index'),
	$model->id,
);


?>
<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		array(
		'label' => 'Nomor Transaksi',
		'name'=>'requestKonsumen.id'),
	array(
			'label' => 'Nama User',	
			'name' => 'user_id'		
		),
	array(
			'label' => 'Divisi',	
			'value' => '[dummy]Umum dan Pelayanan'		
		),		
	
		array(
			'label' => 'Jabatan',	
			'value' => '[dummy]Manajer Senior'					
		),
		array(
			'label' => 'Nama Rapat',
			'name' => 'name'			
		),
		array(
			'label' => 'Ruang Rapat',
			'value' => $model->room->name
			
		),
		'room_id',
		//'type of food',
		array(
			'label' => 'Makanan',
			'value' => $this->renderPartial('_makanan', array('model'=>$model->requestKonsumen->makananKonsumens), true),
			'type' => 'html',
		),
		//'amount',
		array(
			'label' => 'Waktu Keperluan',
			'value' => $this->renderPartial('_waktutanggal', array('model'=>$model), true),
			'type' => 'html',
			)
		,
		'requestKonsumen.status',
		//'post_id',
	),
));?>

<?php 	echo '<br>';
		echo '<H3> Dari pemohon konsumsi :</h3>';
		echo CHtml::activeTextArea($model->requestKonsumen,'message',array('style'=>'height:150px;width:400px;','disabled'=>'disabled'));
		if ($model->requestKonsumen->status == 'waiting')
		{
		echo '<br><br>';
		echo CHtml::beginForm();
		echo '<H3> Untuk pemohon konsumsi :</h3>';
		echo CHtml::activeTextArea($model->requestKonsumen,'message_admin',array('style'=>'height:150px;width:400px'));
		
		}?>

<?php 	echo '<br>';
		if ($model->requestKonsumen->status == 'waiting'){
		echo CHtml::button('Approve', array('submit' => array('controller/action'))); 
		echo CHtml::button('Rejected', array('submit' => array('controller/action'))); }
		echo CHtml::endForm();
		?>

